package com.gao.jacksonconfig;

import com.gao.jacksonconfig.domain.MyRequest;
import com.gao.jacksonconfig.domain.Person;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

/**
 * @author GaoXi
 * @date 2022/3/1 20:57
 */
@RestController
public class TestController {

    @RequestMapping("test")
    public Person test(@RequestBody MyRequest request){

        Person person = new Person();
        person.setId(1L);
        person.setName("高溪");
        person.setMoney(request.getBigDecimal());
        return person;
    }


}
